package edu.its.dreamteam.web.components;

import org.apache.tapestry.MarkupWriter;
import org.apache.tapestry.annotations.Parameter;
import org.apache.tapestry.ioc.annotations.Inject;

import edu.its.dreamteam.daf.beans.Formation;
import edu.its.dreamteam.daf.dao.IFormationDao;

public class OutputFormation {
	@Parameter
    private String idFormation;
	@Inject
	private IFormationDao formationDao;
	
	
	public IFormationDao getFormationDao() {
		return formationDao;
	}

	void beginRender(MarkupWriter writer)
    {
		Formation formation = (Formation)getFormationDao().findByPrimaryKey(idFormation);
        writer.write(formation.getFormation());
    }
}
